from django.contrib import admin
from django.urls import path,include
from rest_framework import routers
from . import views
rou = routers.SimpleRouter()
rou.register('',views.UserView,'login')
rou.register('',views.StudentHomeView,'showclass')
rou.register('',views.AdminView,'admin')
rou.register('',views.UtilView,'util')
rou.register('',views.TeacherView,'teacher')
rou.register('exam',views.AdminExamView,'adminexam')
rou.register('passexam',views.AdminExamViewT,'admint')
rou.register('failexam',views.AdminExamViewF,'adminf')
rou.register('',views.TeacherExamView,'teaexampass')
rou.register('semester',views.SemesterView)
rou.register('messege',views.SchoolMessegeView)
rou.register('',views.AdminCreateCPC,'createcpc')
rou.register('class',views.ShowClass)
rou.register('showcollege',views.ShowCollege)
rou.register('showprofession',views.ShowProfession)
rou.register('',views.AdminGetMesView,'adminss') #管理员实现课程详细的接口，详细课程表
rou.register('',views.UtilFindPasswordView,'findpassword') #用户找回密码路由，需要使用redis数据库，前端没有
#学生和老师查看当前课程的详细情况
rou.register('',views.CourseDetailView,'detailcourse')
#带分页功能的同班同学查询
rou.register('pagestudens',views.StudentClassView,'pagestudents')
#带分页功能的老师查某个班级的所有学生
rou.register('teapagestudent',views.TeacherGetStuclassView,'teapages')
#获取学院-专业-班级的对应关系
rou.register('',views.AdminStuclassView,'colproclass')
#管理员通过学期id和课程id获取学生的课程成绩
rou.register('adclasscreit',views.AdminStuCreditView,'adclasscredit')
#过滤，通过学号、班级、姓名查找学生
rou.register('searchstudents',views.AmindSearchStudentView,'searchstu')
#遍历课程成绩，低于60分的，is_pass=False
rou.register('',views.OpelationMysqlView,'setpass')
#管理员创建课程
rou.register('',views.AdminCreateView,'admincreate')
#老师选修课可能
rou.register('',views.TeaChoiceCourseView,'teachoicecourse')
#学生选修课功能
rou.register('',views.StuChoiceCourseView,'stuchoicecourse')
#管理员处理选修课
rou.register('',views.AdminChoiceCoureseView,'admichc')
#生成excel表格的视图函数
rou.register('',views.ExportExcelTableView,'create_excel')
#查看自己生成班级信息的excel表格
rou.register('messagexcel',views.TeaShowStuMsg,'messagexcel')
#查看自己生成的学期班级课程成绩excel表格
rou.register('showcreditexcel',views.TeaShowStuCredit,'creditexcel')
#跟奖学金相关的路由
rou.register('',views.Scholarship,'scholarship')
#查看学期专业课程成绩表
rou.register('professioncredit',views.TeaShowProfessionCredit,'procredit')
#测试按行读取excel中所有数据
rou.register('',views.TestExcelView,'testexcel')
#删除和修改奖学金记录的路由
rou.register('prizedelchan',views.AmdinPrizeDelChange,'delandchange')
urlpatterns = [

]
urlpatterns+=rou.urls
